<%@ include file="/common/taglibs.jsp"%>
<probiz:pageHeading pageHeadingKey="menu.newsletterList" />
<content tag="buttons">
	<probiz:iconBtn btnType="add" onclick="return fnDoAdd(this);" />
	<%--
	<probiz:iconBtn btnType="save" onclick="return fnDoMultiSave(this);" />
	--%>
	<probiz:iconBtn btnType="delete" onclick="return fnDoMultiDelete(this);" />
	
</content>

<search:searchBox formAction="${ctxPath}/customer/newsletter.html">
	<div class="basic_search">
		<search:basicSearch attrPath="s.title" attrNameKey="newsletter.title" datatype="String"	operator="LIKE" classes="inputtxt" labelWidth="90px"/>
	</div>
	<div class="more_search">
		<table border="0" cellspacing="0" cellpadding="0" class="search_table">
			<search:input attrPath="ng.name" attrNameKey="newsletter.belongTo" datatype="String"
						operator="LIKE" classes="inputtxt" style="width:150px" labelWidth="90px"/>
		</table>
	</div>
</search:searchBox>

<form class="mainForm" name="newsletterListForm" method="post">
	<div class="top clearfix">
		<ul class="tab">
			<li class="curr"><span><fmt:message key="menu.newsletterList"/></span></li>
		</ul>
		<%@include file="/common/pagingOnlyTop.jsp"%>
	</div>
	<div class="data">
		<c:set var="checkAll"><input type="checkbox" name="allbox" onclick="checkAll(this.form)" style="margin: 0 0 0 0px" /></c:set>
		<display:table name="${newsletterList}" cellspacing="0" cellpadding="0" uid="newsletterItem"
			class="list_table" export="false" requestURI="" style="width:100%">
			<display:column class="checkbox_column" title="${checkAll}" media="html">
				<input type="checkbox" name="multiIds" value="${newsletterItem.newsletterId}" class="checkbox" title="${newsletterItem.title}"/>
			</display:column>
		    <display:column sortable="true" headerClass="data-table-title"
        		decorator="com.probiz.estore.core.decorator.TblColumnDecorator" titleKey="newsletter.title">
        		<a href="${ctxPath}/customer/newsletter.html?doAction=edit&newsletterId=${newsletterItem.newsletterId}&from=list">${newsletterItem.title}</a>
        	</display:column>
		    <display:column style="width:10%" sortable="true" headerClass="data-table-title"
        		decorator="com.probiz.estore.core.decorator.TblColumnDecorator" titleKey="common.message.status">
        		<c:choose>
        			<c:when test="${newsletterItem.status eq 1}"><fmt:message key="mailQueue.sendStatus2"/></c:when>
        			<c:otherwise><fmt:message key="mailQueue.sendStatus0"/></c:otherwise>
        		</c:choose>
        	</display:column>
		    <display:column  style="width:10%" property="sendTime" sortable="true" headerClass="data-table-title"
        		decorator="com.probiz.estore.core.decorator.TblColumnDecorator" titleKey="newsletter.sendTime">
        	</display:column>
		    <display:column style="width:10%" property="updateTime" sortable="true" headerClass="data-table-title"
        		decorator="com.probiz.estore.core.decorator.TblColumnDecorator" titleKey="common.message.updateTime"/>
		</display:table>
		<%@include file="/common/pagingOnly.jsp"%>
	</div>
</form>
<script type="text/javascript">
$j(document).ready(function () {
	highlightTableRows("newsletterItem");
});
</script>